/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.time.LocalTime;

/**
 * <p>Project: jse2302 - Ex2
 * <p>Powered by webrx On 2023-06-12 17:19:46
 * <p>Created by IntelliJ IDEA
 *
 * @author  webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Ex3 {
    public static void main(String[] args) {
        //分时问候
        var t = LocalTime.now();
        var h = t.getHour();
        if (h >= 6 && h < 8) {
            System.out.println("早上好");
        } else if (h >= 8 && h < 12) {
            System.out.println("上午好");
        } else if (h >= 12 && h < 14) {
            System.out.println("中午好");
        } else if (h >= 14 && h < 18) {
            System.out.println("下午好");
        }
    }
}
